<?php

class protocolObject
{
	public $objectType = "protocolObject";
	public $exitCode = 2;
	public $exitText = "";
	
	public function giveExitStatus($exitCode,$exitStatus)
	{
		$this->exitCode = $exitCode;
		$this->exitText = $exitStatus;
	}
}

function sendDebugInfo($outputObject)
{
	$sqlApprovedObject = urlencode(json_encode($outputObject));
	if(!isset($outputObject->messageSender))
	{
		crowFather("insert into debug(senderId,returnObject) values(3,'" . $sqlApprovedObject . "');",3);
	}
	else
	{
		crowFather("insert into debug(senderId,returnObject) values(" . $outputObject->messageSender . ",'" . $sqlApprovedObject . "');",3);
	}
}
?>